package com.mxl.vhr.controller;

import com.mxl.vhr.model.User;
import com.mxl.vhr.service.IUser2Service;
import com.mxl.vhr.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author MXL
 * @date 2022/2/11
 **/
@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    IUserService userService;

    @Autowired
    IUser2Service user2Service;

    @RequestMapping("/list")
    public List<User> list() {
        return userService.list();
    }

    @RequestMapping("/list2")
    public List<User> list2() {
        return user2Service.list();
    }
}
